import {
  createRouter,
  createWebHistory,
  type RouteRecordRaw
} from 'vue-router';

export const systemRoutes: RouteRecordRaw[] = [
  {
    path: '/login',
    meta: {
      title: '登录',
      loginIngore: true
    },
    component: () => import('@/pages/Base/login/index.vue')
  },
  {
    path: '/401',
    meta: {
      title: '无权限',
      loginIngore: true
    },
    component: () => import('@/pages/Base/401/index.vue')
  },
  {
    path: '/404',
    meta: {
      title: '访问错误',
      loginIngore: true
    },
    component: () => import('@/pages/Base/404/index.vue')
  },
  {
    path: '/:catchAll(.*)',
    component: () => import('@/pages/Base/404/index.vue')
  }
];

const router = createRouter({
  history: createWebHistory(),
  routes: systemRoutes
});

export default router;
